package com.lc.afbx.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/6/23.
 */
@HttpInlet(Conn.INLET_API_INSURANCE_TORENEW)
public class PostApiTorenew extends BaseAsyPost<PostApiTorenew.Info> {
    public String type, userid, policyid, test;

    public PostApiTorenew(AsyCallBack<PostApiTorenew.Info> asyCallBack) {
        super(asyCallBack);
    }

    protected Info parser(JSONObject jsonObject) {

        TOAST = jsonObject.optString("message");

        if (jsonObject.optInt("code") == 200) {

            Info info = new Info();

            JSONObject o = jsonObject.optJSONObject("data");
            info.id = o.optString("id");
            info.ordersn = o.optString("ordersn");


            return info;
        }

        return null;
    }


    public static class Info {

        public String id, ordersn;


    }


}
